// import {CMCServer} from "cmc/cmc.server";
const {CMCServer} = require("cmc/cmc.server");
class CnsService {
    private server: any;
    constructor(opts?: any) {
        let opt = opts ? opts : {};
        this.server = new CMCServer(opt);
        this.server.onError = (err, client) => {
            //todo:ziji de chuli 

        }
    }

    start() {
        this.server.Open();
    }

    listen() {
        this.server.Listen();
    }

    Notify(clientId, msg) {
        this.server.Send(clientId, msg);
    }

    onError: (err) => void;
}

export { CnsService };